package cn.cs.client;

import cn.cs.common.Dto;
import cn.cs.common.Page;
import cn.cs.config.CsConfiguration;
import cn.cs.fallback.ComplaintFallBack;
import cn.cs.fallback.ComplaintTitleFallBack;
import cn.cs.pojo.Complaint;
import cn.cs.pojo.ComplaintTitle;
import cn.cs.pojo.CsPerson;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = ComplaintFallBack.class)
public interface ComplaintClient {




    @RequestMapping(value = "/getComplaintUserById", method = RequestMethod.POST)
    public Complaint getComplaintUserById(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/getComplaintByPhone", method = RequestMethod.POST)
    public List<Complaint> getComplaintByPhone(@RequestParam("userId") String userId)throws Exception;

    @RequestMapping(value = "/getComplaintListByMap", method = RequestMethod.POST)
    public List<Complaint> getComplaintListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getComplaintCountByMap", method = RequestMethod.POST)
    public Integer getComplaintCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/itriptxAddComplaint", method = RequestMethod.POST)
    public Integer itriptxAddComplaint(@RequestBody Complaint complaint)throws Exception;

    @RequestMapping(value = "/itriptxModifyComplaint", method = RequestMethod.POST)
    public Integer itriptxModifyComplaint(@RequestBody Complaint complaint)throws Exception;

    @RequestMapping(value = "/itriptxDeleteComplaintById", method = RequestMethod.POST)
    public Integer itriptxDeleteComplaintById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getAgentByRepairUserId", method = RequestMethod.POST)
    public Map<String, Object> getAgentByRepairUserId(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAgentABByRepairUserId", method = RequestMethod.POST)
    public Map<String, Object> getAgentABByRepairUserId(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAgentABByOrderId", method = RequestMethod.POST)
    public Map<String, Object> getAgentABByOrderId(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getAgentABByAppOrderId", method = RequestMethod.POST)
    public Map<String, Object> getAgentABByAppOrderId(@RequestParam("id") String id) throws Exception;
}

